﻿using NXDO.Data.Factory;
using TDM.DbData.DataEntity;

namespace TDM.WebBiz.Security
{
    /// <summary>
    /// 系统用户表帮助类
    /// </summary>
    public class DaUserHelper
    {
        /// <summary>
        /// 根据用户名返回用户对象
        /// </summary>
        /// <param name="userName"></param>
        /// <returns></returns>
        public static DaUser GetUser(string userName)
        {
            var sql = "select * from DaUser where UserName = {0}";
            return DbHelper.SetCommand(sql, userName).ExecuteEntityScalar<DaUser>();
        }
    }
}
